{% extends 'base.html' %}
{% block main %}
<div class="container">
    <div class="sidebar">
        <div class="title">
            {% include 'head.html' %}
            <h1>{{ name }}的简历</h1>
            <h2>{{ des }}</h2>
        </div>
        <ul class="side-info">
            <li class="someRight">
                <dt><i class="fa fa-bookmark"></i>Basic info. 基本信息</dt>
                <dd><span>个人信息:</span> {{ name }} / {{ gender }} / {{ age }} / {{ grade }}</dd>
                <dd><span>学校：</span>{{school}}</dd>
                <dd><span>专业：</span>{{profession}}</dd>
                {% if english_level %}
                <dd><span>英语水平:</span> {{ english_level }}</dd>
                {% endif %}
                {% if nickname %}
                <dd><span>常用ID:</span> {{ nickname }}</dd>
                {% endif %}
                {% if blog %}
                <dd><span>Blog:</span> <a href="{{ blog }}" target="_blank">{{ blog }}</a></dd>
                {% endif %}
                {% if github %}
                <dd><span>GitHub:</span> <a href="{{ github }}" target="_blank">{{ github }}</a></dd>
                {% endif %}
                {% if online %}
                <dd><span>在线简历:</span> <a href="{{ online }}" target="_blank">{{ online }}</a></dd>
                {% endif %}
            </li>
            <li class="someRight">
                <dt><i class="fa fa-bookmark"></i>Contact. 联系方式</dt>
                {% for item in contact %}
                    <dd><i class="fa {{ item.icon }}"></i>{{ item.name }}: <a {% if item.name == 'Email' %}href="mailto:{{ item.value }}"{% endif %} target="_blank">{{ item.value }}</a></dd>
                {% endfor %}
            </li>
            <li class="someRight">
                <dt><i class="fa fa-bookmark"></i>Application. 应聘岗位</dt>
                <dd>{{ apply_to_position }}</dd>
            </li>
            {% if honor %}
            <li class="someRight">
                <dt><i class="fa fa-bookmark"></i>Honor. 奖项荣誉</dt>
                <dd>
                    {% for item in honor %}
                    <ul>
                        <li>{{ item.date |safe }} {{ item.name |safe }}</li>
                    </ul>
                    {% endfor %}
                </dd>
            </li>
            {% endif %}
            <li class="skill">
                <dt><i class="fa fa-bookmark"></i>Tech. 主要技能点</dt>
                {% for item in tech %}
                <dd>
                    <div class="skill-name">{{ item.name }}</div>
                    <div class="skill-bar-wrap">
                        <div class="skill-bar" style="width: {{ item.percentage }}"></div>
                    </div>
                </dd>
                {% endfor %}
            </li>
        </ul>
        {% if intro %}
        <div class="note">
            {{ intro |safe }}
        </div>
        {% endif %}
    </div>
    <div class="main">
        <ul class="main-info">
            <li class="skill">
                <dt><i class="fa fa-bookmark"></i>Skill. 技能清单</dt>
                {% for item in skill %}
                <ul class="exp">
                  <li>{{ item.des |safe }}</li>
                </ul>
                {% endfor %}
            </li>
            <li class="experience">
                <dt><i class="fa fa-bookmark"></i>Experience. 项目经验</dt>
                {% for exp in experience %}
                    {% if exp.section == '个人项目' %}
                        <h2 class="exp-title">{{exp.section}}</h2>
                        <ul class="exp">
                            {% for item in exp.project %}
                            <li>
                                <div class="circle"></div>
                                <h4>{{ item.name }} {{ item.date }}
                                {% if item.website %}
                                <a href="{{ item.website }}" target="_blank"><i class="fa fa-link"></i>Demo</a>
                                {% endif %}
                                {% if item.source_code %}
                                <a href="{{ item.source_code }}" target="_blank"><i class="fa fa-link"></i>SourceCode</a>
                                {% endif %}
                                </h4>
                                <div class="clearfix">
                                  {% if item.img %}<img src="{{ item.img }}">{% endif %}
                                  {{ item.des |safe }}
                                </div>
                            </li>
                            {% endfor %}
                        </ul>
                    {% else %}
                        <h2 class="exp-title">{{exp.section}}</h2>
                        <ul class="exp">
                            {% for item in exp.exper %}
                            <li>
                                <h4>{{ item.company }} <span>{{ item.date }}</span></h4>
                                <p>{{ item.desc | safe}}</p>
                                <ul>
                                    {% for sub_item in item.project %}
                                        <li>
                                            <div class="circle"></div>
                                            <h4>{{ sub_item.name }} {{ sub_item.date }}
                                            {% if sub_item.website %}
                                            <a href="{{ sub_item.website }}" target="_blank"><i class="fa fa-link"></i>Demo</a>
                                            {% endif %}
                                            {% if sub_item.source_code %}
                                            <a href="{{ sub_item.source_code }}" target="_blank"><i class="fa fa-link"></i>SourceCode</a>
                                            {% endif %}
                                            </h4>
                                            <div class="clearfix">
                                              {% if sub_item.img %}<img src="{{ sub_item.img }}">{% endif %}
                                              {{ sub_item.des |safe }}
                                            </div>
                                        </li>
                                    {% endfor %}
                                </ul>
                            </li>
                            {% endfor %}
                        </ul>
                    {% endif %}
                
                {% endfor %}
            </li>
        </ul>
    </div>
</div>
{% endblock %}
